\begin{algorithm}[H]
    \renewcommand{\algorithmicrequire}{\textbf{Input:}}
	\renewcommand{\algorithmicensure}{\textbf{Output:}}
	\caption{C-Means}
    \label{cmeans}
    \begin{algorithmic}[1] % 控制是否有序号
        \Require  $U,k,m$ ; % input 的内容
	    \Ensure $A,c$; % output 的内容
        
        \State $A=\text{random([|U|,k])}$, 随机生成 $c_i$, $i=1,2,\cdots,k$
        
         % for loop
        \While {$\fan{A-A_{old}}>\varepsilon$}
                \State $\mu_{ij} = \left( \sum_{g=1}^{k}\left( \frac{\fan{x_i-c_j}^2}{\fan{x_i-c_g}^2} \right)^{(\frac{1}{m-1})} \right)^{-1}$;
                \State $c_j = \frac{\sum_{i=1}^{|U|}\mu_{ij}^mx_i}{\sum_{i=1}^{|U|}\mu_{ij}^m}$;
        \EndWhile
        
        \State \textbf{return} $A,c$.
    \end{algorithmic}
\end{algorithm}